.class public Lcom/netease/newsreader/view/MenuPopup;
.super Lcom/netease/newsreader/view/MyPopupWindow;
.source "MenuPopup.java"


# instance fields
.field private mActivity:Landroid/app/Activity;

.field private mOnClickListener:Landroid/view/View$OnClickListener;


# direct methods
.method public constructor <init>(Landroid/app/Activity;)V
    .locals 2
    .parameter "activity"

    .prologue
    .line 23
    const/4 v0, -0x1

    const/4 v1, -0x2

    invoke-direct {p0, p1, v0, v1}, Lcom/netease/newsreader/view/MyPopupWindow;-><init>(Landroid/content/Context;II)V

    .line 24
    iput-object p1, p0, Lcom/netease/newsreader/view/MenuPopup;->mActivity:Landroid/app/Activity;

    .line 25
    const v0, 0x7f0a002f

    invoke-virtual {p0, v0}, Lcom/netease/newsreader/view/MenuPopup;->setAnimationStyle(I)V

    .line 27
    return-void
.end method


# virtual methods
.method protected checkDismissKey(I)Z
    .locals 1
    .parameter "keyCode"

    .prologue
    .line 59
    const/4 v0, 0x4

    if-eq p1, v0, :cond_0

    const/16 v0, 0x52

    if-eq p1, v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method protected checkShowKey(I)Z
    .locals 1
    .parameter "keyCode"

    .prologue
    .line 63
    const/16 v0, 0x52

    if-ne p1, v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public dispatchKeyEvent(Landroid/view/KeyEvent;)Z
    .locals 6
    .parameter "event"

    .prologue
    const/4 v2, 0x1

    const/4 v3, 0x0

    .line 43
    invoke-virtual {p0}, Lcom/netease/newsreader/view/MenuPopup;->isShowing()Z

    move-result v4

    if-eqz v4, :cond_1

    .line 44
    invoke-super {p0, p1}, Lcom/netease/newsreader/view/MyPopupWindow;->dispatchKeyEvent(Landroid/view/KeyEvent;)Z

    move-result v2

    .line 55
    :cond_0
    :goto_0
    return v2

    .line 46
    :cond_1
    invoke-virtual {p1}, Landroid/view/KeyEvent;->getKeyCode()I

    move-result v1

    .line 47
    .local v1, keyCode:I
    invoke-virtual {p1}, Landroid/view/KeyEvent;->getAction()I

    move-result v0

    .line 49
    .local v0, action:I
    invoke-virtual {p0, v1}, Lcom/netease/newsreader/view/MenuPopup;->checkShowKey(I)Z

    move-result v4

    if-eqz v4, :cond_2

    .line 50
    if-ne v0, v2, :cond_0

    .line 51
    iget-object v4, p0, Lcom/netease/newsreader/view/MenuPopup;->mActivity:Landroid/app/Activity;

    const v5, 0x1020002

    invoke-virtual {v4, v5}, Landroid/app/Activity;->findViewById(I)Landroid/view/View;

    move-result-object v4

    const/16 v5, 0x50

    invoke-virtual {p0, v4, v5, v3, v3}, Lcom/netease/newsreader/view/MenuPopup;->showAtLocation(Landroid/view/View;III)V

    goto :goto_0

    :cond_2
    move v2, v3

    .line 55
    goto :goto_0
.end method

.method public setOnClickListener(Landroid/view/View$OnClickListener;[I)V
    .locals 6
    .parameter "listener"
    .parameter "clickIds"

    .prologue
    .line 30
    iput-object p1, p0, Lcom/netease/newsreader/view/MenuPopup;->mOnClickListener:Landroid/view/View$OnClickListener;

    .line 31
    invoke-virtual {p0}, Lcom/netease/newsreader/view/MenuPopup;->getContentView()Landroid/view/View;

    move-result-object v0

    .line 32
    .local v0, contentView:Landroid/view/View;
    if-eqz v0, :cond_0

    .line 33
    if-eqz p2, :cond_0

    array-length v3, p2

    if-lez v3, :cond_0

    .line 34
    array-length v4, p2

    const/4 v3, 0x0

    :goto_0
    if-lt v3, v4, :cond_1

    .line 40
    :cond_0
    return-void

    .line 34
    :cond_1
    aget v1, p2, v3

    .line 35
    .local v1, id:I
    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    .line 36
    .local v2, v:Landroid/view/View;
    iget-object v5, p0, Lcom/netease/newsreader/view/MenuPopup;->mOnClickListener:Landroid/view/View$OnClickListener;

    invoke-virtual {v2, v5}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 34
    add-int/lit8 v3, v3, 0x1

    goto :goto_0
.end method
